package com.cxb.apiDriver.remote;

import com.cxb.internalcommon.dto.Car;
import com.cxb.internalcommon.dto.DriverUser;
import com.cxb.internalcommon.dto.ResponseResult;
import com.cxb.internalcommon.responese.DriverUserExistsResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    /**
     * 修改司机
     * @param driverUser
     * @return
     */
    @PutMapping("/user")
    public ResponseResult modifyDriverUser(@RequestBody DriverUser driverUser);

    /**
     * 根据手机号查询司机
     * @param driverPhone
     * @return
     */
    @GetMapping("/check_driver/{driverPhone}")
    public  ResponseResult<DriverUserExistsResponse> getUser(@PathVariable("driverPhone")String driverPhone);


    /**
     * 查询车辆id
     * @param carId
     * @return
     */
    @GetMapping("/car")
    public ResponseResult<Car> getCarById(@RequestParam Long carId);
}
